<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    $router->resource('users', 'UserController');
    $router->resource('activities', 'ActivityController');
    $router->resource('prizes', 'ActivityPrizeController');
    $router->resource('banner_signs', 'BannerSignController');
    $router->resource('banners', 'BannerController');
    $router->resource('vehicle_series', 'VehicleSeriesController');
    $router->resource('vehicles', 'VehicleController');
    $router->resource('customer_infos', 'CustomerInfoController');
    $router->resource('user_draws', 'UserDrawController');
    $router->resource('dealers', 'DealerController');
    $router->resource('openapi_logs', 'OpenapiLogController');
    $router->resource('user_coupons', 'UserCouponController');
    $router->resource('events', 'EventController');
    $router->resource('event_records', 'EventRecordController');
    $router->resource('articles', 'ArticleController');
    $router->resource('referee_blacks', 'RefereeBlackController');
    $router->resource('referees', 'RefereeController');

    $router->get('qrcode', 'QRCodeController@index');
    $router->get('api/activities', 'Api\SelectController@activities');
    $router->get('api/banner_signs', 'Api\SelectController@bannerSigns');
    $router->get('api/link_types', 'Api\SelectController@linkTypes');
    $router->get('api/series', 'Api\SelectController@series');
    $router->get('api/dealer_levels', 'Api\SelectController@dealerLevels');
    $router->get('api/prize_levels', 'Api\SelectController@prizeLevels');
    $router->get('api/prize_types', 'Api\SelectController@prizeTypes');
    $router->get('api/prize_limits', 'Api\SelectController@prizeLimits');
});
